export function getLoginCode() {
  return new Promise((resolve, reject) => {
    wx.login({
      success: res => {
        resolve(res)
      },
      fail: error => {
        reject(error)
      }
    })
  })
}

export function getUserInfo() {
  return new Promise((resolve, reject) => {
    wx.getUserInfo({
      success: res => {
        resolve(res)
      },
      fail: error => {
        reject(error)
      }
    })
  })
}
